package com.java.comprehensive.design.building_modelling.singleton_pattern;

import cn.hutool.json.JSONUtil;

public class Test {
    public static void main(String[] args) {
        SingletonDemo_3 instance = SingletonDemo_3.getInstance();
        System.out.println(instance.equals(SingletonDemo_3.getInstance()));

        SingletonDemo_6 singletonDemo_6 = SingletonDemo_6.INSANCE;
        System.out.println(singletonDemo_6.getNumName());
        System.out.println(JSONUtil.toJsonStr(singletonDemo_6));
        System.out.println(singletonDemo_6.equals(SingletonDemo_6.INSANCE));
    }
}
